package progetto1.csm.core.actor;

import progetto1.csm.core.SystemElement;
import sde.actor.Actor;

public abstract class Element extends Actor implements ElementIF{
	
	private Watcher watcher;
	
	private SystemElement element;

	protected Element(Watcher watcher, SystemElement element) {
		this.watcher = watcher;
		this.element = element;
	}
	
	protected void enter(Client c){
		watcher.send(new WatcherIF.Enter(c, element));//messaggi istantanei
	}
	
	protected void exit(Client c){
		watcher.send(new WatcherIF.Exit(c, element));
	}
	
	protected void idle(){
		watcher.send(new WatcherIF.Idle(element));
	}

}
